package cn.wb.org.domain;

import cn.wb.base.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data // get set tostring
@AllArgsConstructor // 有参
@NoArgsConstructor // 无参
public class Department extends BaseDomain {
    // 部门编号
    private String sn;
    // 部门名称
    private String name;
    // 部门上级路径
    private String dirPath;
    // 状态
    private Integer state;
    // 负责人
    private Long managerId;
    // 上级部门
    private Long parentId;
    // 负责人
    private Employee manager;
    // 上级部门
    private Department parent;
    // 无限级数 children
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();

}
